package com.port.eleport.model.biz;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.port.eleport.model.base.IdEntity;
import com.port.eleport.model.plat.TMerchant;

/**
 *  支付
 * @author jameschen
 *
 */
@Entity
@Table(name = "biz_pay", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class TPay extends IdEntity{
	
	/**
	 * 支付单号
	 */
	@Column(name="payment_no")
	private String paymentNo;
	
	/**
	 * 商家订单交易号
	 */
	@Column(name="order_seq_no")
	private String orderSeqNo;
	
	/**
	 * 金额
	 */
	@Column(name="amount_")
	private BigDecimal amount;
	
	/**
	 * 币种
	 */
	@Column(name="curr_code")
	private String currCode;
	
	/**
	 * 买家账号
	 */
	@Column(name="buyer_account")
	private String buyerAccount;
	
	/**
	 * 支付方式代码
	 */
	@Column(name="source_")
	private String source;
	
	/**
	 * 银联交易时间
	 */
	@Column(name="create_time")
	private Date createTime;
	
	/**
	 * 订单
	 */
	@ManyToOne
	@JoinColumn(name="order_id")
	private TOrder order;
	
	/**
	 * 商家
	 */
	@ManyToOne
	@JoinColumn(name="merchant_id")
	private TMerchant merchant;

	public String getPaymentNo() {
		return paymentNo;
	}

	public void setPaymentNo(String paymentNo) {
		this.paymentNo = paymentNo;
	}

	public String getOrderSeqNo() {
		return orderSeqNo;
	}

	public void setOrderSeqNo(String orderSeqNo) {
		this.orderSeqNo = orderSeqNo;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getCurrCode() {
		return currCode;
	}

	public void setCurrCode(String currCode) {
		this.currCode = currCode;
	}

	public String getBuyerAccount() {
		return buyerAccount;
	}

	public void setBuyerAccount(String buyerAccount) {
		this.buyerAccount = buyerAccount;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public TOrder getOrder() {
		return order;
	}

	public void setOrder(TOrder order) {
		this.order = order;
	}

	public TMerchant getMerchant() {
		return merchant;
	}

	public void setMerchant(TMerchant merchant) {
		this.merchant = merchant;
	}
}
